﻿using System;
using System.Collections.Generic;
using YJKArchUtils.Utils;

namespace YJKRevitDimensionText.OneKeyPlanDim.DimesionDataEx
{
	public class XYZProjectSort : IComparer<XYZProject>
	{
		public int Compare(XYZProject XYZProject0, XYZProject XYZProject1)
		{
			try
			{
				if (Geometry.LessThan(XYZProject0.m_ptPro.Y, XYZProject1.m_ptPro.Y))
				{
					return -1;
				}
				if (Geometry.IsEqual(XYZProject0.m_ptPro.Y, XYZProject1.m_ptPro.Y) && Geometry.LessThan(XYZProject0.m_ptPro.X, XYZProject1.m_ptPro.X))
				{
					return -1;
				}
			}
			catch
			{
			}
			return 0;
		}
	}
}
